<?
include("robot_pdo.php");
$p = new robot_pdo();
function get_commet_list(){
    global $p;
	$sql="select * from commet";
	$stmt=$p->get_bbs_pdo()->prepare($sql);
	$stmt->execute();
	return $stmt->fetchAll();
}

$list=get_commet_list();
?>
<table>
	<tr>
		<td>id</td>
		<td>mail</td>
		<td>message</td>
		<td>date</td>
	</tr>
	<?php foreach($list as $v){?>
	<tr>
		<td><?php echo $v['id'];?></td>
		<td><?php echo $v['mail'];?></td>
		<td><?php echo $v['content'];?></td>
		<td><?php echo date('Y-m-d H:i:s',$v['time']);?></td>
	</tr>
	<?php }?>
</table>